<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.14.0/css/all.css" rel="stylesheet">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/styles/androidstudio.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/modules/Edu/app.css">

    <title>@yield('title',site()['title'])</title>

</head>
<body class="front">

<div id="app">
    @include('edu::layouts.header')
    <div class="{{route_class()}}">
        <div class="container">
            @include('layouts.message')
        </div>
        <div class="container mt-3 mb-5">
            <div class="row">
                <div class="col-sm-9 col-12 shadow-sm">
                    @yield('content')
                </div>
                <div class="col-sm-3 col-12 shadow-sm">
                    <div class="bg-white shadow-sm border">
                        <a href="{{route('edu.center.topic.index',$user)}}" style="height:180px; overflow: hidden;"
                           class="d-block border-bottom">
                            <img src="{{$user->icon}}" style="width:100%;">
                        </a>
                        <div class="pt-0 p-3">
                            <h6 class="text-muted text-center">{{$user->name}}</h6>
                            <hr>
                            <div class="d-flex justify-content-between text-muted">
                                <i aria-hidden="true" class="fa fa-envelope "></i>
                                <i aria-hidden="true" class="fas fa-phone-square text-info"></i>
                                <i aria-hidden="true" class="fab fa-weibo "></i>
                                <i aria-hidden="true" class="fab fa-weixin "></i>
                                <i aria-hidden="true" class="fab fa-github "></i>
                                <i aria-hidden="true" class="fab fa-qq "></i>
                            </div>
                        </div>

                        @if($user->id!=user('id'))
                            <div class="text-center pb-3">
                                <a href="{{route('user.follower',$user)}}"
                                   title=""
                                   class="btn btn-sm  {{$user->isFollower($user) ? 'btn-success' : 'btn-outline-success'}} ">
                                    <i class="fa fa-plus"></i>
                                    {{$user->isFollower($user) ? '已关注' : '关注 TA'}}
                                </a>
                                <a href="{{route('common.favour',['User',$user->id])}}"
                                   class="btn btn-sm {{$user->make()->isFavour ? 'btn-info' : 'btn-outline-info'}} ">
                                    <i class="fas fa-heart "></i>
                                    {{$user->make()->isFavour ? '感谢点赞' : '点个赞呗'}}
                                </a>
                            </div>
                        @endif
                    </div>
                    <div class="card rounded shadow-sm bg-white mt-2">
                        <div class="card-body p-0">
                            <div class="list-group list-group-flush">
                                <a href="{{route('edu.center.topic.index',$user)}}"
                                   class="list-group-item list-group-item-action text-secondary ">
                                    TA的贴子
                                </a>
                                <a href="{{route('edu.center.follower.index',$user)}}"
                                   class="list-group-item list-group-item-action text-secondary">
                                    TA的关注
                                </a>
                                <a href="{{route('edu.center.fan.index',$user)}}"
                                   class="list-group-item list-group-item-action text-secondary">
                                    TA的粉丝
                                </a>
                                <a href="{{route('edu.center.favorite.index',[$user,'Lesson'])}}"
                                   class="list-group-item list-group-item-action text-secondary">
                                    TA的收藏
                                </a>
                                <a href="{{route('edu.center.study-path.index',$user)}}"
                                   class="list-group-item list-group-item-action text-secondary">
                                    TA学习历史
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>


    @include('edu::layouts.footer')
</div>


@stack('scripts')


<script src="{{mix('/modules/Edu/app.js')}}"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>
